package ch07;

import ch07.pojo.Supplier;
import ch07.service.SupplierService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SupplierTest {
    /**
     * 查询所有供货商名称
     */
    @Test
    public void supName(){
        //实例化Spring的上下文
        ApplicationContext cxt=new ClassPathXmlApplicationContext("applicationch07.xml");

        //获取SupplierService实例
        SupplierService supplierService=cxt.getBean(SupplierService.class);

        Supplier supplier=new Supplier();

        supplierService.selectSupplierList(supplier);
    }
}
